<template>
  <div class="map-container">
    <!-- BMAP_HYBRID_MAP卫星地图 -->
    <!-- dddd -->
    <!-- <mapInfoPopup></mapInfoPopup> -->
    <!-- <bm-info-window
            :position="{ lng: marker.lng, lat: marker.lat }"
            :show="showMapPopup"
            @close="infoWindowClose"
            @open="infoWindowOpen"
            class="bm-info-window"
          >
          
          </bm-info-window> -->
    <!-- <baidu-map
      class="bm-view"
      :center="center"
      :zoom="zoom"
      scroll-wheel-zoom
      map-type="BMAP_NORMAL_MAP"
      @ready="handler"
    >
      <bm-marker
        v-for="(marker, index) in markers"
        :key="index"
        :position="{ lng: marker.lng, lat: marker.lat }"
        :icon="{
          url: marker.icon,
          size: { width: 38, height: 86 },
        }"
        @click="infoWindowOpen"
      >
 
      </bm-marker>
    </baidu-map> -->
    <div class="mapContainer" id="mapContainer"></div>
    <mapTip
      v-if="cureentMenu != 1"
      class="map-tips"
      :cureentMenu="cureentMenu"
    ></mapTip>
  </div>
</template>

<script>
import mapTip from "@/components/mapTip/mapTip.vue";
// // import mapInfoPopup from "@/components/mapInfoPopup/mapInfoPopup.vue";
import { mixins } from "@/utils/mapMixin.js";
import mapStyle from "@/assets/custom_map_config.json";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "index",
  components: { mapTip },
  mixins: [mixins],
  props: {
    cureentMenu: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      fullScreen: true,
      showMapPopup: false,
      map: null,
    };
  },
  mounted() {
  },
  methods: {
    infoWindowClose() {
      this.showMapPopup = false;
    },
    infoWindowOpen() {
      this.showMapPopup = true;
    },
  },
};
</script>

<style scoped lang="scss">
.map-container {
  width: 100%;
  height: 100%;
  position: relative;

  .mapContainer {
    width: 100%;
    height: 100%;
  }
  // 清除 标识
  ::v-deep .BMap_cpyCtrl {
    display: none !important;
  }
  ::v-deep .anchorBL {
    display: none !important;
  }
  .bm-view {
    width: 100%;
    height: 100%;
    position: relative;
    .tips-control {
      width: 7vw;
      border-radius: 3px;
      background: #0b214a;
      display: flex;
      flex-direction: column;
      justify-content: center;
      margin-right: 21.3vw;
      margin-bottom: 1.6vh;
      padding: 0.2vw 1vh;
      z-index: 10;
      box-sizing: border-box;

      .item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 0.16rem;
        line-height: 2vh;
        cursor: pointer;
        > div {
          width: 12%;
          height: 4vh;
          margin-right: 0.6vw;
          margin-bottom: 0.5vh;
          > img {
            width: 100%;
            height: 100%;
          }
        }
        > div:first-child {
          margin-top: 1vh;
        }
        > div:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
  // 清除 标识
  ::v-deep .BMap_cpyCtrl {
    display: none !important;
  }
  ::v-deep .anchorBL {
    display: none !important;
  }

  .map-tips {
    position: absolute;
    right: 3%;
    bottom: 3%;
    z-index: 100;
  }
}
</style>
